home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / text_eng.zip / GL.H < prev    next >
C/C++ Source or Header  |  1995-12-12  |  3KB  |  119 lines

  1.  
  2.  
  3.  
  4. /* From PAL.C */
  5. void GL_SetColor(int index,int r,int g,int b);
  6. void GL_GetColor(int index,int *r,int *g,int *b);
  7. void GL_SetPal(unsigned char *pal,int start,int numcols);
  8. void GL_GetPal(unsigned char *pal,int start,int numcols);
  9. void GL_FadeInPal(unsigned char *npal,int speed);
  10. void GL_CyclePal(unsigned char *pal,int numcols,int direction);
  11. int  GL_FindColor(unsigned char *pal,int r,int g,int b,int spr);
  12. void GL_ReIndexPal(unsigned char *index,
  13.                                 unsigned char *opal,unsigned char *npal);
  14.  
  15.  
  16. /* From SCR.C */
  17. void GL_InitMode13(void);
  18. void GL_TextMode(void);
  19. void GL_ClearScreen(void);
  20. void GL_ClearScreenColor(int color);
  21. void GL_SetPixel(int x,int y,int color);
  22. int  GL_GetPixel(int x,int y);
  23. void GL_FillBox(int x1,int y1,int x2,int y2,int color);
  24. void GL_FilledBox(int x1,int y1,int w,int h,int color);
  25. void GL_Rectangle(int x1,int y1,int x2,int y2,int color);
  26. void GL_Line(int x1,int y1,int x2,int y2,int color);
  27. void GL_HLine(int x1,int x2,int y,int color);
  28. void GL_VLine(int x,int y1,int y2,int color);
  29. void GL_Circle(int x,int y,int radius);
  30.  
  31. void GL_SetDrawingBuffer(unsigned char *buffer);
  32. unsigned char *GL_MakeDrawingBuffer(void);
  33. void GL_FreeDrawingBuffer(unsigned char *buffer);
  34. void GL_UpdateScreen(unsigned char *buffer);
  35.  
  36. void GL_WaitVBL(void);
  37.  
  38. void GL_PutImage(int x,int y,struct image_s *image);
  39. void GL_GetImage(int x,int y,struct image_s *image);
  40. void GL_PutSprite(int x,int y,int sx,int sy,unsigned char *image);
  41.  
  42.  
  43. void GL_Putc( int c );
  44. void GL_Puts( char *str);
  45. int GL_TextXSize(char *str);
  46. int GL_LoadFont( char* font );
  47. void GL_ItalicsOn(void);
  48. void GL_ItalicsOff(void);
  49. void GL_GotoXY( int x, int y );
  50. int GL_GetX(void);
  51. int GL_GetY(void);
  52. void GL_BoldOff(void);
  53. void GL_BoldOn(void);
  54. void GL_PutText(int x,int y,char *str);
  55. void GL_TextColor(int color);
  56. void GL_TextShadow(int color,int offsetx,int offsety);
  57. void GL_TextUnderline(int color,int offsety);
  58. void GL_TextBold(int thickness);
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. void GL_PutText(int x,int y,char *str);
  70. void GL_TextColor(int color);
  71. void GL_TextShadow(int color,int offsetx,int offsety);
  72. void GL_TextUnderline(int color,int offsety);
  73. void GL_TextBold(int thickness);
  74. int  GL_TextXSize(char *str);
  75. int  GL_TextYSize(char *str);
  76. int  GL_LoadFontFile(char *fname);
  77. void GL_UseFont(int fontID);
  78.  
  79. /* ACTIVE FOR MODE X ONLY (no effect in Mode 13H): */
  80. void GL_SetVisualPage(int page);
  81. void GL_SetActivePage(int page);
  82. int  GL_GetVisualPage(void);
  83. int  GL_GetActivePage(void);
  84.  
  85.  
  86. /* image.c */
  87. int GL_Gif( char* file, char * buffer, char * pal, int* width, int* height );
  88.  
  89.  
  90. /* glkey.c */
  91. void GL_AddKey(int down,int up);
  92. void GL_TrapKeys(void);
  93. void GL_ReleaseKeys(void);
  94.  
  95. struct GL_KEYMAP                        /* This holds a list of key scan   */
  96. {                                       /* codes that we want to trap.     */
  97.    unsigned char downcode;              /* Code when key is pressed        */
  98.    unsigned char upcode;                /* Code when key is released       */
  99. };
  100.  
  101. extern unsigned char *ScrBuffer;
  102. extern struct GL_KEYMAP GL_Keys[32];
  103. extern char   GL_NumKeys;
  104. extern char   GL_KeyStat[32];           /* You can test if a given key is   */
  105.  
  106. #define random(num)(int)(((long)rand()*(num))/(RAND_MAX+1))
  107. #define randomize()     srand((unsigned)time(NULL))
  108.  
  109. void disable(void);
  110. void enable(void);
  111.  
  112.  
  113. #pragma aux disable =  "cli"
  114. #pragma aux enable =   "sti"
  115.  
  116.  
  117.  
  118.  
  119.